package com.qdlc.p2p.dal.dto;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.qdlc.p2p.common.constant.Global;

/**
 * 理财人待收计划实体
 *
 * @author liya
 * @version 1.1.0.0
 */
@Entity
@Table(name = Global.DB_PREFIX + "additional_flow_yield_plan")
public class AdditionalFlowYieldPlan {

    /** 主键 */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private long id;

    /** 理财投资id */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "flow_investor_id")
    private AdditionalFlowInvestor flowInvestor;

    /** 理财项目id */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "flow_project_id")
    private AdditionalFlowProject flowProject;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "user_id")
    private User user;

    /** 状态:0:未还，1:已还 */
    private byte status;

    /** 回款期数 */
    private int period;

    /** 预计收回本金 */
    private double waitMoney;

    /** 预计收回收益 */
    private double waitYields;

    /** 实际收回本金 */
    private double yesMoney;

    /** 实际收回收益 */
    private double yesYidlds;

    /** 预计回款时间 */
    private Date waitTime;

    /** 实际还款时间 */
    private Date yesTime;

    /**
     * 获取主键
     *
     * @return 主键
     */
    public long getId() {
        return id;
    }

    /**
     * 设置主键
     *
     * @param id 要设置的主键
     */
    public void setId(long id) {
        this.id = id;
    }

    public AdditionalFlowInvestor getFlowInvestor() {
        return flowInvestor;
    }

    public void setFlowInvestor(AdditionalFlowInvestor flowInvestor) {
        this.flowInvestor = flowInvestor;
    }

    public AdditionalFlowProject getFlowProject() {
        return flowProject;
    }

    public void setFlowProject(AdditionalFlowProject flowProject) {
        this.flowProject = flowProject;
    }

    /**
     * 获取状态:0:未还，1:已还
     *
     * @return 状态:0:未还，1:已还
     */
    public byte getStatus() {
        return status;
    }

    /**
     * 设置状态:0:未还，1:已还
     *
     * @param status 要设置的状态:0:未还，1:已还
     */
    public void setStatus(byte status) {
        this.status = status;
    }

    /**
     * 获取回款期数
     *
     * @return 回款期数
     */
    public int getPeriod() {
        return period;
    }

    /**
     * 设置回款期数
     *
     * @param period 要设置的回款期数
     */
    public void setPeriod(int period) {
        this.period = period;
    }

    /**
     * 获取预计收回本金
     *
     * @return 预计收回本金
     */
    public double getWaitMoney() {
        return waitMoney;
    }

    /**
     * 设置预计收回本金
     *
     * @param waitMoney 要设置的预计收回本金
     */
    public void setWaitMoney(double waitMoney) {
        this.waitMoney = waitMoney;
    }

    /**
     * 获取预计收回收益
     *
     * @return 预计收回收益
     */
    public double getWaitYields() {
        return waitYields;
    }

    /**
     * 设置预计收回收益
     *
     * @param waitYields 要设置的预计收回收益
     */
    public void setWaitYields(double waitYields) {
        this.waitYields = waitYields;
    }

    /**
     * 获取实际收回本金
     *
     * @return 实际收回本金
     */
    public double getYesMoney() {
        return yesMoney;
    }

    /**
     * 设置实际收回本金
     *
     * @param yesMoney 要设置的实际收回本金
     */
    public void setYesMoney(double yesMoney) {
        this.yesMoney = yesMoney;
    }

    /**
     * 获取实际收回收益
     *
     * @return 实际收回收益
     */
    public double getYesYidlds() {
        return yesYidlds;
    }

    /**
     * 设置实际收回收益
     *
     * @param yesYidlds 要设置的实际收回收益
     */
    public void setYesYidlds(double yesYidlds) {
        this.yesYidlds = yesYidlds;
    }

    /**
     * 获取预计回款时间
     *
     * @return 预计回款时间
     */
    public Date getWaitTime() {
        return waitTime;
    }

    /**
     * 设置预计回款时间
     *
     * @param waitTime 要设置的预计回款时间
     */
    public void setWaitTime(Date waitTime) {
        this.waitTime = waitTime;
    }

    /**
     * 获取实际还款时间
     *
     * @return 实际还款时间
     */
    public Date getYesTime() {
        return yesTime;
    }


    /**
     * 设置实际还款时间
     *
     * @param yesTime 要设置的实际还款时间
     */
    public void setYesTime(Date yesTime) {
        this.yesTime = yesTime;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }


}


